﻿using ST.Torch.WebApi.Core.Entities.System;
using System.Linq.Expressions;


namespace ST.Torch.WebApi.Application.Utils.Services;

public interface IUtilExcelService
{
    #region curd
    IRepository<UtilExcel> GetRepository();
    void Insert(UtilExcel entity);


    Task InsertAsync(UtilExcel entity, string[] Includes = null);

    void Update(UtilExcel entity, string[] Includes = null);

    Task UpdateAsync(UtilExcel entity, string[] Includes = null);

    void Delete(UtilExcel entity, bool IsSoft = false);

    Task DeleteAsync(UtilExcel entity, bool IsSoft = false);
    bool Any(Expression<Func<UtilExcel, bool>> predicate);


    Task<bool> AnyAsync(Expression<Func<UtilExcel, bool>> predicate);

    UtilExcel Single(Expression<Func<UtilExcel, bool>> predicate, bool tracking = false);

    Task<UtilExcel> SingleAsync(Expression<Func<UtilExcel, bool>> predicate, bool tracking = false);

    List<UtilExcel> Query(Expression<Func<UtilExcel, bool>> predicate, bool tracking = false);

    Task<List<UtilExcel>> QueryAsync(Expression<Func<UtilExcel, bool>> predicate, bool tracking = false);


    PagedList<UtilExcel> QueryPage(Expression<Func<UtilExcel, bool>> predicate, PageReq page, bool tracking = false);

    Task<PagedList<UtilExcel>> QueryPageAsync(Expression<Func<UtilExcel, bool>> predicate, PageReq page, bool tracking = false);





    #endregion
}
